package com.example.contestsystem.Entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Entity
@Table(name = "contest")
public class Contest {
    @Id
    private String contestId;
    private String contestName;
    private String contestDescription;
    private int teacherAccount;
    private int teamMemberLimit;
    private int teamMemberMin;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    private int isValid;


    public String getContestId() {
        return contestId;
    }

    public void setContestId(String contestId) {
        this.contestId = contestId;
    }

    public String getContestName() {
        return contestName;
    }

    public void setContestName(String contestName) {
        this.contestName = contestName;
    }

    public String getContestDescription() {
        return contestDescription;
    }

    public void setContestDescription(String contestDescription) {
        this.contestDescription = contestDescription;
    }

    public int getTeacherAccount() {
        return teacherAccount;
    }

    public void setTeacherAccount(int teacherAccount) {
        this.teacherAccount = teacherAccount;
    }

    public int getTeamMemberLimit() {
        return teamMemberLimit;
    }

    public void setTeamMemberLimit(int teamMemberLimit) {
        this.teamMemberLimit = teamMemberLimit;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public int getTeamMemberMin() {
        return teamMemberMin;
    }

    public void setTeamMemberMin(int teamMemberMin) {
        this.teamMemberMin = teamMemberMin;
    }

    public int getIsValid() {
        return isValid;
    }

    public void setIsValid(int isValid) {
        this.isValid = isValid;
    }
}
